﻿package pages
{
	import com.gaiaframework.templates.AbstractPage;
	import com.gaiaframework.events.*;
	import com.gaiaframework.debug.*;
	import com.gaiaframework.api.*;
	import com.greensock.plugins.DynamicPropsPlugin;
	import com.greensock.plugins.TweenPlugin;
	import flash.display.*;
	import flash.events.*;
	import com.greensock.TweenMax;
	
	public class IndexPage extends AbstractPage
	{	
		public function IndexPage()
		{
			super();
			alpha = 0;
			//new Scaffold(this);
		}
		override public function transitionIn():void 
		{
			super.transitionIn();
			var assetNodes:XMLList = IXml(assets.mapPictures).xml.asset;
			var homePage:IPageAsset = Gaia.api.getPage(Pages.HOME);
			TweenPlugin.activate([DynamicPropsPlugin]);
			
			Gaia.api.addAssets(assetNodes, homePage);
			TweenMax.to(this, 0.3, {alpha:1, onComplete:transitionInComplete});
		}
		override public function transitionOut():void 
		{
			super.transitionOut();
			TweenMax.to(this, 0.3, {alpha:0, onComplete:transitionOutComplete});
		}
	}
}
